package com.hnucm.c202001020216.api;

import com.hnucm.c202001020216.pojo.Comment;
import com.hnucm.c202001020216.pojo.Response;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Path;

@SuppressWarnings("all")
public interface CommentApi {
    @GET("comment/usercomment/byCarIdList/{carId}")
    Call<Comment> findByCarId(@Path("carId")Integer carId);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("comment/usercomment/save")
    Call<Comment> addComment(@Body RequestBody comment);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @POST("comment/usercomment/update")
    Call<Response> updateComment(@Body RequestBody comment);

}
